from base import Base
from selenium.webdriver.common.by import By

class Page(Base):

    input1 = (By.ID,'input')

    input2 = (By.NAME,'q')

    def input(self):
        self.send_keys(self.input1,'我在做软件测试')

    goto = (By.ID,'search-button')

    def goto_loc(self):
        self.click(self.goto)

    dy = (By.ID,'m-spread-left')

    def dy_loc(self):
        return self.text(self.dy)

    two = (By.XPATH,'//*[@id="page"]/a[1]')

    def two_loc(self):
        self.click(self.two)

    dy2 =(By.ID,'main')

    def dy2_loc(self):
        return self.text(self.dy2)